Skip to content

feat: include bin path#92

Closed
RyanTranAVB wants to merge 1 commit intoOCA:mainfrom
RyanTranAVB:main
Closed

feat: include bin path#92
RyanTranAVB wants to merge 1 commit intoOCA:mainfrom
RyanTranAVB:main

Conversation

@RyanTranAVB
Copy link
Copy Markdown

I'm using uv tool to install and manage pre-commit, which makes oca-port failed complaining that pre-commit doesn't exist.

This commit make sure that the local bin path is included so that tools get installed using this method won't break.

Comment thread oca_port/utils/git.py


env = os.environ.copy()
extra_path = os.path.expanduser("~/.local/bin")
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

In that case, why not adding ~/.local/bin to your user's $PATH environment variable? So pre-commit will be found automatically?

For instance, this is what pipx ensurepath command does in ~/.bashrc (but you could do the same in ~/.profile):

# Created by `pipx` on 2026-01-09 17:34:00
export PATH="$PATH:/home/user/.local/bin"

@sebalix
Copy link
Copy Markdown
Collaborator

sebalix commented Jan 28, 2026

Closing, as the handling of PATH environment variable is not linked to oca-port.

@sebalix sebalix closed this Jan 28, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants